/*
建立一个链表，每个结点存储一个学生的姓名和成绩，将a,b,c三个结点按照分数由高到低链接起来，然后输出，编写链表结点连接函数connect。

链表的结构定义方式如下：

struct Node {

char *name;

int  score;

struct Node *next;

};

请你完成以下函数代码

struct Node * connect(struct Node *x, struct Node *y, struct Node *z)
{

}
*/

/*
测试用例1:
输入：
100,90,80↵
输出：
LiPing-100↵
LiuHai-90↵
FengYun-80↵

测试用例2:
输入：
90,95,94↵
输出：
LiuHai-95↵
FengYun-94↵
LiPing-90↵
*/
#include <stdio.h>  
#include <stdlib.h>  

struct Node {  
	char *name;  
	int  score;  
	struct Node *next;  
};  

struct Node *  connect(struct Node *x, struct Node *y, struct Node *z);  

int main(int argc, char *argv[]) {      
	struct Node a, b, c, *p;  
	
	
	a.name = "LiPing";  
	b.name = "LiuHai";  
	c.name = "FengYun";   
	scanf("%d,%d,%d", &a.score, &b.score, &c.score);  
	p= connect(&a,&b,&c);  
	printf("%s-%d\n",p->name,p->score);  
	p=p->next;  
	printf("%s-%d\n",p->name,p->score);  
	p=p->next;  
	printf("%s-%d\n",p->name,p->score);  
	return 0;  
}  